<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ page import="com.gzbugu.polytechsasia.vo.Article"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<tiltle></tiltle>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="en/css/add.css"/>	
		<script type="text/javascript" src="en/js/jquery-1.4.4.min.js"></script>
        <script type="text/javascript" src="xheditor/xheditor-1.1.14-zh-cn.min.js"></script>
	</head>


<body style="background:#C0DEED;">
	<%!
		int id,type ;
		String content,title ;
	 %>
	 
 	<%
 		Article article = null ;
 		article = (Article)request.getAttribute("article") ;
 		if(article!=null){
 			id = article.getId() ;
 			type = article.getType() ;
 			content = article.getContent() ;
 			title = article.getTitle() ;
 		}
 	 %>

			<div class="title">管理中心</div>
			<div class="welcome">发表文章</div>

		

<!--  <div id="content"> -->
<form action="UpdateArticle" method="post" name="form" onsubmit="check()">
	<input type="hidden" name="id" value="<%=id%>"/>
	<div class="submit-content">
	<table>
		<tbody>
		<tr>
			<th style="width:200px;text-indent:1em;text-align:left; background:url(en/images/bg-btn-blue.png) repeat-x;">标题:</th>
			<td ><input style="height:20px;width:400px" type="text" class="article-title" name="title" id="title" value="<%=title%>"/></td>
		</tr>
		
		<tr>
			<th style="width:200px;text-indent:1em;text-align:left; background:url(en/images/bg-btn-blue.png) repeat-x;">类型:</th>
			<td >	
					<select type="text" name="type" style="height:20px;width:150px;text-align">

					<%
						if(type==0){
					 %>
						<option value="">==请选择==</option>
						<option value="0" selected="selected">英文</option>
						<option value="1">英文</option>
					<%
					}
					 %>
					 	<%
						if(type==1){
					 %>
						<option value="">==请选择==</option>
						<option value="0">中文</option>
						<option value="1" selected="selected">中文</option>
					<%
					}
					 %>
					</select>
			</td>
		</tr>
		</tbody>
	 	<tfoot>
		<tr>
			<th class="content" style="width:200px;line-height:40px;border-bottom:none;text-indent:1em;">内容:</th>
			<td><textarea name="content" id="content" class="xheditor {tools:'Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,Removeformat,Align,Cut,Copy,Paste,Pastetext,|,Source,Fullscreen'}" style="width:650px;height:250px;"><%=content %></textarea></td>
		</tr>
		</tfoot> 
		</table>
<!--  	<div class="wenzi">
		<div class="wenzilist" style="width:300px;text-indent:1em;" >内容:</div>
		<div class="wenzicontent"><textarea name="textarea" style="width:600px;height:250px;"></textarea></div>
	</div>
-->	
</div>
	<div class="button">
		<input type="submit" onclick="return check()" class="text-submit" value="提交"/>
		<script type="text/javascript">
		function check(){
            var t=document.getElementById( 'title');
            if(t.value.length==0) {
                alert("标题不能为空");
                t.value="";
                t.focus();
                return false;
            }
            else {
                return true;
            }
        }
		</script>                    <!---------验证实现不了？？？-->
		<input type="reset" class="reset" value="重置"/>
	</div>
<!-- </div>  -->
</form>
<div id="footer"></div>


</body>
</html>